package com.stormrage.entity.learn.rep;

import java.io.Serializable;

import com.stormrage.entity.exam.ExmScore;

/**
 * @Title: LeaStudentRep.java
 * @Package com.stormrage.entity.learn.rep
 * @Description: 学员 返回 类
 * @author www.stormragetech.com
 * @date 2016年4月15日
 * @version V1.0
 */
public class LeaStudentRep implements Serializable {

	// ------------------------------- Fields -------------------------------

	private static final long serialVersionUID = -2848896265082378995L;

	// ------------------------------- Fields -------------------------------

	private Integer seq;

	private Integer id;

	private Integer bunchId;
	
	private Integer termId;

	private String stuNo;

	private String realName;

	private String phone;

	private String email;

	private Integer locked;

	private String lockStr;

	private String study;

	private Integer exam;

	private Integer oper;

	private Integer usua;

	private Integer total;

	// ------------------------------- Fields -------------------------------

	public LeaStudentRep() {
	}

	// ------------------------------- Fields -------------------------------

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getTermId() {
		return termId;
	}

	public void setTermId(Integer termId) {
		this.termId = termId;
	}

	public Integer getBunchId() {
		return bunchId;
	}

	public void setBunchId(Integer bunchId) {
		this.bunchId = bunchId;
	}

	public String getStuNo() {
		return stuNo;
	}

	public void setStuNo(String stuNo) {
		this.stuNo = stuNo;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public Integer getLocked() {
		return locked;
	}

	public void setLocked(Integer locked) {
		this.locked = locked;
	}

	public String getLockStr() {
		return lockStr;
	}

	public void setLockStr(String lockStr) {
		this.lockStr = lockStr;
	}

	public String getStudy() {
		return study;
	}

	public void setStudy(String study) {
		this.study = study;
	}

	public Integer getExam() {
		return exam;
	}

	public void setExam(Integer exam) {
		this.exam = exam;
	}

	public Integer getOper() {
		return oper;
	}

	public void setOper(Integer oper) {
		this.oper = oper;
	}

	public Integer getUsua() {
		return usua;
	}

	public void setUsua(Integer usua) {
		this.usua = usua;
	}

	public Integer getTotal() {
		return total;
	}

	public void setTotal(Integer total) {
		this.total = total;
	}

	// ------------------------------- Fields -------------------------------

	public static LeaStudentRep instance(LeaStudentRep entity, Integer seq) {
		entity.setSeq(seq);
		if (null != entity.getLocked() && entity.getLocked().equals(0))
			entity.setLockStr("通过");
		if (null != entity.getLocked() && entity.getLocked().equals(1))
			entity.setLockStr("未通过");
		return entity;
	}

	public static LeaStudentRep instance(LeaStudentRep entity, Integer seq, String study) {
		entity.setSeq(seq);
		entity.setStudy(study);
		return entity;
	}

	public static LeaStudentRep instance(LeaStudentRep entity, ExmScore score, Integer total, Integer seq) {
		entity.setSeq(seq);
		if (null != score) {
			entity.setExam(score.getExam());
			entity.setOper(score.getOper());
			entity.setUsua(score.getUsua());
			entity.setTotal(total);
		} else {
			entity.setExam(0);
			entity.setOper(0);
			entity.setUsua(0);
			entity.setTotal(0);
		}
		return entity;
	}

	@Override
	public String toString() {
		return this.getClass() + " : id - " + id + " bunchId - " + bunchId + " stuNo - " + stuNo + " realName - "
				+ realName + " phone - " + phone + " email - " + email + " locked - " + locked + " lockStr - "
				+ lockStr;
	}

}
